Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use preloadData stuff #314

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Use preloadData stuff #314

merged 3 commits into from
Sep 30, 2024

Conversation

JorisGoosen
Copy link
Contributor

}
else
{
dataset.factors <- .readDataSetToEnd(columns.as.factor = c(variables, splitName))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but wouldn't it make more sense to assume that if preloadData = TRUE then .readDataSetToEnd is a no-op? This could also be

Suggested change
dataset.factors <- .readDataSetToEnd(columns.as.factor = c(variables, splitName))
dataset.factors <- dataset
for (var in c(variables, splitName))
dataset.factors[[var]] <- as.factor(dataset.factors[[var]])

although I guess there is no guarantee that this is exactly the same as if you'd read the variables as factor directly (e.g., read facGender as numeric -> all NA -> as.factor -> all NA vs. read facGender as factor -> actual data). Hmm this really shows descriptives needs another rewrite...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, if you disable preloading in Description.qml it will go back to the old behaviour anyway

@JorisGoosen JorisGoosen merged commit 1ae3ea4 into master Sep 30, 2024
10 checks passed
@JorisGoosen JorisGoosen deleted the preloadData branch September 30, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants